package com.Dao.DaoImpl;

import com.Dao.BookDao;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;

public class BookDaoImpl implements BookDao, InitializingBean, DisposableBean {
    private BookDaoImpl() {
        /*System.out.println("BookDaoImpl 构造方法实现了");*/
    }

    public BookDaoImpl(String s) {

    }

    public BookDaoImpl(String s, String s2) {

    }

    @Override
    public void save() {
        System.out.println("book dao save ...");
    }


    //提供与生命周期相关的方法
    //1.表示bean的初始化对应的操作
    public void init(){
        //相关配置文件加载,图片资源加载...
        System.out.println("init执行了...");
    }

    //2.表示bean的销毁时对应的操作
    public void destroy(){
        System.out.println("destroy执行了...");
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("初始化/...");
    }
}
